package com.woniu.register.controller;

import com.woniu.common.util.ResultVO;
import com.woniu.register.dto.DemurDTO;
import com.woniu.register.dto.NoticeDTO;
import com.woniu.register.service.DemurLoginService;
import com.woniu.register.service.NoticeLoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：zhulongxing
 * @date ：Created in 2022/12/14 17:28
 * @description：
 * @modified By：
 * @version: $
 */
@RestController
@RequestMapping("demurs")
public class DemurController {
    @Autowired
    private DemurLoginService demurLoginService;
    @PostMapping("add")
    @Transactional
    public ResultVO add(@RequestBody DemurDTO demurDTO){
        demurLoginService.insertSelective(demurDTO);
        return ResultVO.success("新增成功");
    }
}
